﻿using Autofac.Extras.DynamicProxy;
using Common.AutofaExt;
using Common.AutofaExt.AOP;
using IService;
using System;
using System.Collections.Generic;
using System.Linq;


namespace Service
{
    //[Intercept(typeof(CustomerInterceptor))]
    public class ApplePhone : IPhone
    {

        [CusotmSelect]
        public IMicrophone Microphone { get; set; }
        public IHeadphone Headphone { get; set; }
        public IPower Power { get; set; }
        public string menuName { get => "苹果手机管理"; set => throw new NotImplementedException(); }

        public ApplePhone(IHeadphone iHeadphone)
        {
            this.Headphone = iHeadphone;
            Console.WriteLine("{0}带参数构造函数", this.GetType().Name);
        }

        public virtual void Call()
        {
            Console.WriteLine("{0}打电话", this.GetType().Name); ;
        }

        public void Text()
        {
            Console.WriteLine("{0}发信息", this.GetType().Name); ;
        }


        public ParameterInfo QueryUser(ParameterInfo opara)
        {
            return opara;
        }


        public void Init123456678890(IPower iPower)
        {
            this.Power = iPower;
        }
    }
}
